.class abstract Lcom/instagram/creation/video/gl/b;
.super Ljava/lang/Object;
.source "BasicTexture.java"

# interfaces
.implements Lcom/instagram/creation/video/gl/ac;


# static fields
.field private static i:Ljava/util/WeakHashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/WeakHashMap",
            "<",
            "Lcom/instagram/creation/video/gl/b;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private static j:Ljava/lang/ThreadLocal;


# instance fields
.field protected a:I

.field protected b:I

.field protected c:I

.field protected d:I

.field protected e:I

.field protected f:I

.field protected g:Lcom/instagram/creation/video/gl/d;

.field private h:Z


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 54
    new-instance v0, Ljava/util/WeakHashMap;

    invoke-direct {v0}, Ljava/util/WeakHashMap;-><init>()V

    sput-object v0, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    .line 56
    new-instance v0, Ljava/lang/ThreadLocal;

    invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V

    sput-object v0, Lcom/instagram/creation/video/gl/b;->j:Ljava/lang/ThreadLocal;

    return-void
.end method

.method protected constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 68
    const/4 v0, 0x0

    invoke-direct {p0, v0, v1, v1}, Lcom/instagram/creation/video/gl/b;-><init>(Lcom/instagram/creation/video/gl/d;II)V

    .line 69
    return-void
.end method

.method protected constructor <init>(Lcom/instagram/creation/video/gl/d;II)V
    .locals 3
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v1, 0x0

    const/4 v0, -0x1

    .line 58
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    iput v0, p0, Lcom/instagram/creation/video/gl/b;->c:I

    .line 46
    iput v0, p0, Lcom/instagram/creation/video/gl/b;->d:I

    .line 53
    iput-object v1, p0, Lcom/instagram/creation/video/gl/b;->g:Lcom/instagram/creation/video/gl/d;

    .line 59
    invoke-virtual {p0, p1}, Lcom/instagram/creation/video/gl/b;->a(Lcom/instagram/creation/video/gl/d;)V

    .line 60
    iput p2, p0, Lcom/instagram/creation/video/gl/b;->a:I

    .line 61
    iput p3, p0, Lcom/instagram/creation/video/gl/b;->b:I

    .line 62
    sget-object v1, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    monitor-enter v1

    .line 63
    :try_start_0
    sget-object v0, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    const/4 v2, 0x0

    invoke-virtual {v0, p0, v2}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 64
    monitor-exit v1

    .line 65
    return-void

    .line 64
    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0
.end method

.method public static k()V
    .locals 3

    .prologue
    .line 193
    sget-object v1, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    monitor-enter v1

    .line 194
    :try_start_0
    sget-object v0, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    invoke-virtual {v0}, Ljava/util/WeakHashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/creation/video/gl/b;

    .line 195
    invoke-virtual {v0}, Lcom/instagram/creation/video/gl/b;->j()V

    goto :goto_0

    .line 197
    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0

    :cond_0
    :try_start_1
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 198
    return-void
.end method

.method public static l()V
    .locals 4

    .prologue
    .line 201
    sget-object v1, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    monitor-enter v1

    .line 202
    :try_start_0
    sget-object v0, Lcom/instagram/creation/video/gl/b;->i:Ljava/util/WeakHashMap;

    invoke-virtual {v0}, Ljava/util/WeakHashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/creation/video/gl/b;

    .line 203
    const/4 v3, 0x0

    iput v3, v0, Lcom/instagram/creation/video/gl/b;->b:I

    .line 204
    const/4 v3, 0x0

    invoke-virtual {v0, v3}, Lcom/instagram/creation/video/gl/b;->a(Lcom/instagram/creation/video/gl/d;)V

    goto :goto_0

    .line 206
    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0

    :cond_0
    :try_start_1
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 207
    return-void
.end method

.method private n()V
    .locals 2

    .prologue
    .line 170
    iget-object v0, p0, Lcom/instagram/creation/video/gl/b;->g:Lcom/instagram/creation/video/gl/d;

    .line 171
    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/instagram/creation/video/gl/b;->h()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 172
    invoke-interface {v0, p0}, Lcom/instagram/creation/video/gl/d;->a(Lcom/instagram/creation/video/gl/b;)Z

    .line 174
    :cond_0
    const/4 v0, 0x0

    iput v0, p0, Lcom/instagram/creation/video/gl/b;->b:I

    .line 175
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/gl/b;->a(Lcom/instagram/creation/video/gl/d;)V

    .line 176
    return-void
.end method


# virtual methods
.method public a()I
    .locals 1

    .prologue
    .line 91
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->a:I

    return v0
.end method

.method protected a(II)V
    .locals 5
    .parameter
    .parameter

    .prologue
    const/16 v1, 0x1000

    .line 80
    iput p1, p0, Lcom/instagram/creation/video/gl/b;->c:I

    .line 81
    iput p2, p0, Lcom/instagram/creation/video/gl/b;->d:I

    .line 82
    invoke-static {p1}, Lcom/instagram/creation/video/j/n;->b(I)I

    move-result v0

    iput v0, p0, Lcom/instagram/creation/video/gl/b;->e:I

    .line 83
    invoke-static {p2}, Lcom/instagram/creation/video/j/n;->b(I)I

    move-result v0

    iput v0, p0, Lcom/instagram/creation/video/gl/b;->f:I

    .line 84
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->e:I

    if-gt v0, v1, :cond_0

    iget v0, p0, Lcom/instagram/creation/video/gl/b;->f:I

    if-le v0, v1, :cond_1

    .line 85
    :cond_0
    const-string v0, "BasicTexture"

    const-string v1, "texture is too large: %d x %d"

    const/4 v2, 0x2

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    iget v4, p0, Lcom/instagram/creation/video/gl/b;->e:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    iget v4, p0, Lcom/instagram/creation/video/gl/b;->f:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    invoke-static {v0, v1, v2}, Lcom/facebook/e/a/a;->c(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 88
    :cond_1
    return-void
.end method

.method protected a(Lcom/instagram/creation/video/gl/d;)V
    .locals 0
    .parameter

    .prologue
    .line 72
    iput-object p1, p0, Lcom/instagram/creation/video/gl/b;->g:Lcom/instagram/creation/video/gl/d;

    .line 73
    return-void
.end method

.method public a(Lcom/instagram/creation/video/gl/d;IIII)V
    .locals 6
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 140
    move-object v0, p1

    move-object v1, p0

    move v2, p2

    move v3, p3

    move v4, p4

    move v5, p5

    invoke-interface/range {v0 .. v5}, Lcom/instagram/creation/video/gl/d;->a(Lcom/instagram/creation/video/gl/b;IIII)V

    .line 141
    return-void
.end method

.method public b()I
    .locals 1

    .prologue
    .line 96
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->c:I

    return v0
.end method

.method protected abstract b(Lcom/instagram/creation/video/gl/d;)Z
.end method

.method public c()I
    .locals 1

    .prologue
    .line 101
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->d:I

    return v0
.end method

.method public d()I
    .locals 1

    .prologue
    .line 106
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->e:I

    return v0
.end method

.method public e()I
    .locals 1

    .prologue
    .line 111
    iget v0, p0, Lcom/instagram/creation/video/gl/b;->f:I

    return v0
.end method

.method public f()Z
    .locals 1

    .prologue
    .line 126
    iget-boolean v0, p0, Lcom/instagram/creation/video/gl/b;->h:Z

    return v0
.end method

.method protected finalize()V
    .locals 2

    .prologue
    .line 180
    sget-object v0, Lcom/instagram/creation/video/gl/b;->j:Ljava/lang/ThreadLocal;

    const-class v1, Lcom/instagram/creation/video/gl/b;

    invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V

    .line 181
    invoke-virtual {p0}, Lcom/instagram/creation/video/gl/b;->i()V

    .line 182
    sget-object v0, Lcom/instagram/creation/video/gl/b;->j:Ljava/lang/ThreadLocal;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V

    .line 183
    return-void
.end method

.method protected abstract g()I
.end method

.method public h()Z
    .locals 2

    .prologue
    const/4 v0, 0x1

    .line 151
    iget v1, p0, Lcom/instagram/creation/video/gl/b;->b:I

    if-ne v1, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public i()V
    .locals 0

    .prologue
    .line 157
    invoke-direct {p0}, Lcom/instagram/creation/video/gl/b;->n()V

    .line 158
    return-void
.end method

.method public j()V
    .locals 0

    .prologue
    .line 166
    invoke-direct {p0}, Lcom/instagram/creation/video/gl/b;->n()V

    .line 167
    return-void
.end method
